
import Vue from 'vue';

import {
	Message, Modal, Tooltip, Poptip,
	RadioGroup, Radio, Tabs, TabPane,
	Dropdown, DropdownMenu, DropdownItem,
	Slider, CheckboxGroup, Checkbox, Icon, Spin
} from 'view-design';

const components = {
	Message, Modal, Tooltip, Poptip,
	RadioGroup, Radio, Tabs, TabPane,
	Dropdown, DropdownMenu, DropdownItem,
	Slider, CheckboxGroup, Checkbox, Icon, Spin
};

const modules: { [index: string]: any } = components;

Vue.prototype.$Modal = Modal;
Vue.prototype.$Message = Message;
Vue.prototype.$Spin = Spin;
Object.keys(modules).forEach((key) => {
	Vue.component(key, modules[key]);
});
